﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>评论</title>
    <link href="/CSS/bootstrap3.3.5/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="/CSS/font-awesome-4.3.0/css/font-awesome.css?v=4.3.0" rel="stylesheet">
    <link href="/CSS/V3/animate.css" rel="stylesheet">
    <link href="/CSS/V3/jsTree/style.min.css" rel="stylesheet">
    <link href="/CSS/V3/style.css?v=2.2.0" rel="stylesheet">
    <link href="/CSS/V3/BaseClassV3.css" rel="stylesheet" />
    <link href="/JqueryPlug/raty/jquery.raty.css" rel="stylesheet" />
    <script src="/Scripts/jquery-1.11.2.min.js"></script>
    <script src="/JqueryPlug/V3/jsTree/jstree.min.js"></script>
    <script src="/JqueryPlug/laypage/laypage.js"></script>
    <script src="/Scripts/avalon.js"></script>
    <script src="/Scripts/SZHLCommon.js?jsver=5"></script>
    <script src="/JqueryPlug/raty/jquery.raty.js?v=1.3"></script>
    <script>
        var model = avalon.define({
            $id: "comment",
            username: ComFunJS.getnowuser(),
            ID: ComFunJS.getQueryString("ID", 0),
            Type: ComFunJS.getQueryString("Type", 0),
            cruser: ComFunJS.getQueryString("UserName", ""),
            Points: "0",
            plnr: {},
            AddPL: function () {
                if ($('#pc').raty('score')) {
                    model.Points = parseInt($('#pc').raty('score')) * 20;
                }
                var plcontent = $('#pl').val();
                if ($.trim(plcontent) == "") {
                    parent.ComFunJS.winwarning("请输入批注内容");
                    return "";
                }
                $.post('/API/FTAPI.ashx?Action=ADDCOMENT', { "P1": plcontent, "Points": model.Points, "MsgType": model.Type, "MsgLYID": model.ID }, function (result) {
                    var result = $.parseJSON(result);
                    if (result.ErrorMsg == "") {
                        model.plnr= result.Result;
                    }

                })
            }
        });
        avalon.ready(function () {
            $('#pc').raty();
            $.ajaxSetup({
                async: false
            });
        })
        function getpl() {
            model.AddPL();
            return model.plnr;
        }
    </script>
</head>
<body class="gray-bg" ms-controller="comment">

    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">

            <div class="col-sm-12">
                <div>
                    <!--ms-if="username!=cruser"-->
                    评分：
                    <div id="pc" style="line-height: 23px;margin-bottom:10px">

                    </div>
                </div>
                <div>
                    评论：
                    <div>
                        <textarea class="form-control" autofocus="autofocus" id="pl" placeholder="填写评论..." style="height:200px"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
